package cn.luke.basic.controller;


import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.luke.basic.debounces.Debounce;
import cn.luke.basic.entity.DtoPayHistory;
import cn.luke.basic.log_api.LogApi;
import cn.luke.basic.rs.ResponseResult;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


import cn.luke.basic.utils.MyAssert;


import cn.luke.basic.services.ServicePayHistory;




/**
 * 支付历史
 * pathName
 */

@RestController
@ResponseResult
@SaCheckLogin
@RequestMapping("/dotPayHistory" )
public class ControllerPayHistory implements MyAssert {
    @Resource
    private ServicePayHistory servicePayHistory;


    /**
     * 支付历史-保存
     */
    @Debounce
    @LogApi("支付历史-保存")
    @PostMapping("/save")
    @SaCheckPermission("dotPayHistory.save")
    public void register(@RequestBody DtoPayHistory dotPayHistory) {
        idIsNull(dotPayHistory.getId(), "ID");
        servicePayHistory.save(dotPayHistory);
    }

}
